package org.game.ddd.client.bean;

import lombok.AllArgsConstructor;
import org.game.ddd.common.model.MapModel;
import org.game.ddd.client.view.CellView;
import org.game.ddd.client.view.MapView;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@AllArgsConstructor
public class MapBean {
    private List<CellView> cellViewList;

    @Bean
    public MapView mapView() {
        MapModel mapModel = new MapModel();

        return new MapView(mapModel, cellViewList);
    }
}
